[feat] #78 - 집중 모드#82
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Walkthrough사용자의 오늘 투두를 조회하는 집중모드 API가 신규 추가되었다. FocusController가 GET /api/v1/focus 엔드포인트를 제공하고, FocusService가 사용자 타임존 기준 오늘 투두를 조회해 NO_TODO_TODAY, GET_FOCUS_TODO, ALL_TODO_COMPLETED 상태를 판단한다. FocusTodoResponse, FocusTodoResult, FocusSuccessCode가 응답 및 성공 코드 구조를 정의한다. Changes집중모드 조회 기능
Estimated code review effort: 2 (Simple) | ~15 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant FocusController
participant FocusService
participant HomeTodoReader
participant UserRepository
Client->>FocusController: GET /api/v1/focus
FocusController->>FocusService: getFocusTodo(userId)
FocusService->>UserRepository: findById(userId)
UserRepository-->>FocusService: User
FocusService->>HomeTodoReader: load(오늘 범위)
HomeTodoReader-->>FocusService: 투두 목록
FocusService-->>FocusController: FocusTodoResult(successCode, response)
FocusController-->>Client: BaseResponse<FocusTodoResponse>
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Jy000n
left a comment
There was a problem hiding this comment.
로직들도 깔끔하게 분리되어 있고 좋은 것 같습니다-!!
| public record FocusTodoResult( | ||
| FocusSuccessCode successCode, | ||
| FocusTodoResponse response | ||
| ) { } |
There was a problem hiding this comment.
이것도 여백으로 치나요 안 치나요 상관없나요 (동글둥글당글딩글)
| ALL_TODO_COMPLETED(HttpStatus.OK, "오늘의 TODO를 모두 완료했습니다."), | ||
| ; |
| List<TodoResponse> todos = homeTodoReader.sortedTodosOn(loaded, today); | ||
|
|
||
| if (todos.isEmpty()) { | ||
| return new FocusTodoResult(FocusSuccessCode.NO_TODO_TODAY, FocusTodoResponse.empty(today)); |
There was a problem hiding this comment.
TODO 없음 , 모두 완료 , 조회 성공 케이스를 FocusTodoResult로 successCode와 response를 같이 넘기도록 분리 깔끔하네용 PR 설명에 적힌 의도도 코드에서 잘 드러나는 것 같습니다!
| import com.Timo.Timo.domain.home.dto.response.HomeResponse.SubtaskResponse; | ||
| import com.Timo.Timo.domain.home.dto.response.HomeResponse.TagResponse; | ||
| import com.Timo.Timo.domain.home.dto.response.HomeResponse.TodoResponse; |
There was a problem hiding this comment.
p4) Focus 응답 DTO가 Home 응답 DTO(TodoResponse, TagResponse, SubtaskResponse)에 직접 의존하고 있어서 Home API 응답 구조가 바뀌면 Focus API에도 같이 영향이 갈 수 있지 않나 싶었어용
Home과 동일한 응답 구조를 의도적으로 재사용하는 거라면 굿굿슨이지만 Focus API를 독립적으로 가져갈 계획이라면 전용 DTO로 분리하는 것도 좋을 것 같다는 말이었어용
There was a problem hiding this comment.
focus의 경우 home의 오늘 조회와 유사해서 재사용을 노렸습니다. 이후 focus와 관련된 api가 늘어난다면 따로분리하는게 좋을 것 같네용
관련 이슈 🛠
작업 내용 요약 ✏️
집중 모드 api
주요 변경 사항 🛠️
트러블 슈팅 ⚽️
없습니당
스크린샷 📷
같은 todo를 너무 많이 만들어서 정확한지는 잘 모르겠지만.... 일단 되었습니다...

리뷰 요구사항 📢
없어용
Summary by CodeRabbit